﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="_619BJP.Models"%>
<%@ Import Namespace="_619BJP.Web.Controllers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=ViewData["Title"] %> - 619保健品点评网
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
    <link href="../../Content/css/Instance/Product/ProductDetails.css" rel="stylesheet"
        type="text/css" />
    <script src="../../Scripts/Component/jquery-1.4.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#comparison_btn").click(function () {
                var products = $("#product_comparison ul li input:checkbox:checked");
                if (products.length > 1)//至少选中一种状态
                {
                    var p_check = "";
                    products.each(function () {
                        p_check += $(this).val() + ",";
                    });
                    p_check = p_check.substr(0, p_check.length - 1);
                    window.location = "/Product/ProductComparison/" + p_check;
                } else {
                    alert("请至少选中两个产品。");
                }
            });

        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% ProductModel product = (ProductModel)ViewData.Model;%>
    <div id="navigation">
        <span>你现在的位置： <a href="/Home/Index">首页</a> ></span> 
        <span > <a href="/Product/ProductIndex">保健品</a></span>
    </div>

    <div id="productname"><%=product.product_name %></div>
  
    <div id="productimg">
        <img src="../..<%=product.img_url %>" alt="<%=product.product_name %>"/>
        <div class="comment_count">已有<%=product.view_count %>位网友查看过此产品 <%--| <span>详细说明书</span>--%></div>
    </div>

   <div id="product_info">
<%--    <div class="top"><span> 得分：</span> </div>--%>
     <ul>
<%--     <li>英文名称：  xxxxx</li>--%>
         <li>品    牌：  <a href="/Brand/BrandDetails/<%=product.brand_id %>"><%=product.brand_name %></a></li>
         <li>类    别：  <a href="/Product/ProductList/<%=product.category_id %>"><%=product.category_name %></a></li>
         <li>批准文号：  <%=product.approve_number %></li>
         <li>生产企业：  <%=product.producer %></li>
         <li>产品规格：  <%=product.product_specification %></li>
         <li>适合人群：  <%=product.suit_crowds %></li>
         <li>产品功效：  <%=product.health_functions %></li>
         <li>产品价格：  ￥<%=product.market_price %></li>
     </ul>
<%--
     <div class="oper"> 
       <div  id="used"></div>
       <div  id="want"></div>
       <div  id="addcomment"></div>
     </div>--%>
   </div>

   <div id="product_detail">
       <div id="product_detail_title">
            <ul class="tabs">
                <li  class="product current">产品介绍</li>
                <%--<li  class="brand">用户评价</li>--%>
            </ul>
          </div>
           <div id="product_detai_content">
            <%=product.description %>
           </div>
    </div>

   <div id="product_comparison">
    <div class="title">同类产品比较  </div>
    <%System.Data.DataSet compare_ds = (new ProductController()).GetProductsCompare(product.ProductID,product.category_id,3);
          if (compare_ds.Tables[0].Rows.Count > 0)
          {
         %>
            <ul>
            <li>
                <a href="/Product/ProductDetails/<%=product.ProductID%>"><img src="../..<%=product.img_url %>"/></a>
                <div class="prodcut_name"><a href="/Product/ProductDetails/<%=product.ProductID%>"><%=product.product_name %></a></div>
                <div class="check_product"><input type="checkbox" name="check_product_compare" value="<%=product.ProductID%>" checked="checked"/></div>
            </li>
             <%for (int j = 0; j < compare_ds.Tables[0].Rows.Count; j++)
               {%>
            <li>
                <a href="/Product/ProductDetails/<%=compare_ds.Tables[0].Rows[j]["id"].ToString()%>"><img src="../..<%=compare_ds.Tables[0].Rows[j]["img_url"].ToString() %>"/></a>
                <div class="prodcut_name"><a href="/Product/ProductDetails/<%=compare_ds.Tables[0].Rows[j]["id"].ToString()%>"><%=compare_ds.Tables[0].Rows[j]["product_name"].ToString()%></a></div>
                <div class="check_product"><input type="checkbox" name="check_product_compare" value="<%=compare_ds.Tables[0].Rows[j]["id"].ToString()%>"/></div>
            </li>
            <%} %>
            </ul>
     <div id="comparison_btn"></div>
             <%}else{ %>暂无
        <%}%>
   </div>
    <div id="like">
        <div class="title">您可能喜欢</div>
        <%System.Data.DataSet like_ds = (new BrandController()).GetPartProductsByBrand(product.brand_id,4);
          if (like_ds.Tables[0].Rows.Count > 0)
          {
         %>
        <ul>
             <%for (int j = 0; j < like_ds.Tables[0].Rows.Count; j++)
               {%>
            <li>
                <a href="/Product/ProductDetails/<%=like_ds.Tables[0].Rows[j]["id"].ToString()%>"><img src="../..<%=like_ds.Tables[0].Rows[j]["img_url"].ToString() %>"/></a>
                <div class="prodcut_name"><a href="/Product/ProductDetails/<%=like_ds.Tables[0].Rows[j]["id"].ToString()%>"><%=like_ds.Tables[0].Rows[j]["product_name"].ToString()%></a></div>
            </li>
            <%} %>
        </ul>
        <%}else{ %>暂无
        <%}%>
    </div>

<%--     <div id="browsing_history">
           <div class="title">你的浏览记录 <a>清空</a> </div>
           <ul>
           <li>
           <img src="../../ProductImages/201109135414.jpg" />
            <div class="prodcut_des">
              产品描述 产品描述 产品描述 产品描述 产品描述 产品描述 
            </div>
           </li>
           <li>
            <img src="../../ProductImages/201109135414.jpg" />
            <div class="prodcut_des">
              产品描述 产品描述 产品描述 产品描述 产品描述
            </div>
           </li>
           <li>
            <img src="../../ProductImages/201109135414.jpg" />
            <div class="prodcut_des">
              产品描述 产品描述 产品描述 
            </div>
           </li>
           </ul>

         </div>

   
     <div id="ad_1">
        <img  src="../../AdImages/ad_1.jpg" alt=""/>
     </div>


     <div id="ranklist">
      <div class="title">此品牌产品评论排行榜  </div>
     </div>--%>


</asp:Content>


